package com.world.rickcloudendpoint.service.net.session;

import com.world.rickcloudendpoint.common.exception.NetMessageException;
import com.world.rickcloudendpoint.message.AbstractNetMessage;

/**
 * @description: 消息处理器
 * @author: jlsong
 * @date: 2021/12/24 21:07:00
 * @version: 1.0
 */
public interface INetMessageSender {

    /**
     * 发送消息
     *
     * @param message 消息
     * @return
     * @throws NetMessageException
     */
    boolean sendMessage(AbstractNetMessage message) throws NetMessageException;

    /**
     * 关闭
     *
     * @throws NetMessageException
     */
    void close() throws NetMessageException;
}
